<?php
// src/Acme/MainBundle/Menu/MenuBuilder.php

namespace CHOMP\SGIBundle\Services\Menu;

use CHOMP\SGIBundle\Services\SessionManager;
use Knp\Menu\FactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\DependencyInjection\Container;
use CHOMP\SGIBundle\Entity\Rol;

	class MenuBuilder
	{
	    private $factory;
	    /**
	    * @var SessionManager
	    */
	    public $sessManager;
	    
	    /**
	     * @var Session
	     */
	    public $session;

	    /** 
	     * 
	     * @var Container
	     */
	    public $container;

	    /**
	     * @param FactoryInterface $factory
	     * @param SessionManager $sessManager
	     */
	    public function __construct(FactoryInterface $factory){ //,SessionManager $sessManager){ 
	        $this->factory = $factory; 
	        //$this->sessManager = $sessManager;
	    }

		public function createMainMenu(Container $container) //Request $request, SessionManager $sessionmanager,
   		{
   			$this->sessManager = $container->get('session.manager');
   			$menu = $this->sessManager->getMainMenu( $container->get('request') );
			return $menu;
       
		}

		public function createLeftMenu(Container $container) //Request $request, SessionManager $sessionmanager,
   		{
   			$this->sessManager = $container->get('session.manager');
   			$menu = $this->sessManager->getLeftMenu( $container->get('request') );
   			
			return $menu;
       
		}
	}
